8 research outputs found

    On Static Analysis for Expressive Pattern Matching

    Get PDF
    Pattern matching is a widespread programming language construct that enables definitions of values by cases, generalizing if-then-else and case statements. The cases in a pattern matching expression should be exhaustive: when the value does not match any of the cases, the expression throws a run-time exception. Similarly, each pattern should be reachable, and, if possible, patterns should be disjoint to facilitate reasoning. Current compilers use simple analyses to check patterns. Such analyses ignore pattern guards, use static types to approximate possible expression values, and do not take into account properties of user-defined functions. We present a design and implementation of a new analysis of pattern matching expressions. Our analysis detects a wider class of errors and reports fewer false alarms than previous approaches. It checks disjointness, reachability, and exhaustiveness of patterns by expressing these conditions as formulas and proving them using decision procedures and theorem provers. It achieves precision by propagating possible values through nested expressions and approximating pattern-matching guards with formulas. It supports user-defined ``extractor'' functions in patterns by relying on specifications of relationships between the domains of such functions. The result is the first analysis that enables verified, declarative pattern matching with guards in the presence of data abstraction. We have implemented our analysis and describe our experience in checking a range of pattern matching expressions in a subset of the Scala programming language

    State Exploration of Scala Actor Programs

    Get PDF
    The growing use of multicore and networked computing systems is increasing the importance of developing reliable parallel and distributed code. Unfortunately, developing and testing such code is notoriously hard, especially for shared-memory models of programming. The actor model offers a promising alternative paradigm based on message passing. Essentially, an actor is an autonomous concurrent object which interacts with other actors only by exchanging messages. In actor-based systems, the key source of non-determinism is the order in which messages are delivered to—and processed by—the actors. Bugs can still occur in actor programs as the interleaving of messages may be incorrect, or the sequential code within an actor can have bugs. We developed a general framework, called SEJAP, for exploring possible message schedules in actor systems compiled to the Java bytecode. Specifically, in this dissertation, we present one instantiation of SEJAP for the actor library of the Scala programming language. To the best of our knowledge, this is the first framework that allows systematic exploration of Scala actor programs. We also present two optimization

    Decision procedures for algebraic data types with abstractions

    Get PDF
    We describe a parameterized decision procedure that extends the decision procedure for functional recursive algebraic data types (trees) with the ability to specify and reason about abstractions of data structures. The abstract values are specified using recursive abstraction functions that map trees into other data types that have decidable theories. Our result yields a decidable logic which can be used to prove that implementations of functional data structures satisfy recursively specified invariants and conform to interfaces given in terms of sets, multisets, or lists, or to increase the automation in proof assistants. 1

    Risk of Guillain-Barr\ue9 syndrome after 2010-2011 influenza vaccination

    No full text
    Influenza vaccination has been implicated in Guillain Barr\ue9 Syndrome (GBS) although the evidence for this link is controversial. A case-control study was conducted between October 2010 and May 2011 in seven Italian Regions to explore the relation between influenza vaccination and GBS. The study included 176 GBS incident cases aged 6518 years from 86 neurological centers. Controls were selected among patients admitted for acute conditions to the Emergency Department of the same hospital as cases. Each control was matched to a case by sex, age, Region and admission date. Two different analyses were conducted: a matched case-control analysis and a self-controlled case series analysis (SCCS). Case-control analysis included 140 cases matched to 308 controls. The adjusted matched odds ratio (OR) for GBS occurrence within 6 weeks after influenza vaccination was 3.8 (95 % CI: 1.3, 10.5). A much stronger association with gastrointestinal infections (OR = 23.8; 95 % CI 7.3, 77.6) and influenza-like illness or upper respiratory tract infections (OR = 11.5; 95 % CI 5.6, 23.5) was highlighted. The SCCS analysis included all 176 GBS cases. Influenza vaccination was associated with GBS, with a relative risk of 2.1 (95 % CI 1.1, 3.9). According to these results the attributable risk in adults ranges from two to five GBS cases per 1,000,000 vaccinations
    corecore